package top.yongyan0624.entity;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 
 * </p>
 *
 * @author yongyan
 * @since 2021-09-03
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class Vote extends BaseEntity {

    private static final long serialVersionUID = 1L;

    private Integer type;

    private String title;

    @TableField("`option`")
    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
    private String option;

    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
    private Long userId;

    private LocalDateTime startTime;

    private LocalDateTime endTime;

    @TableField(exist = false)
    private List<String> optionList;

    @TableField(exist = false)
    private Map<Integer,Integer> optionMap;

    @TableField(exist = false)
    private List<Integer> voteIndex;

    @TableField(exist = false)
    private SysUser user;

    @TableField(exist = false)
    private List<SysUser> voteUserList;
}
